﻿CREATE TABLE [dbo].[TempArticleSales]
(
	--Campos de Ventas
	[Id] INT UNIQUE IDENTITY(1,1) NOT NULL,
	[StoreId] [smallint] NULL,
	[ArticleId] [int] NULL,
	[Date] [date] NOT NULL,
	[Units] [int] NOT NULL,
	[Sales] [money] NOT NULL,
	[GM] [money] NOT NULL,
	[GrossSales] [money] NOT NULL,
	[Price] [money] NULL,
	[Confirmed] [bit] NULL,
	[NetMargin] [money] NULL,
	[PIDiffUnits] [int] NULL,
	[PIDiff] [money] NULL,
	[ChargeOffsUnits] [int] NULL,
	[ChargeOffs] [money] NULL,
	[Rebates] [money] NULL,
	[BonusBuyNumber] [varchar](100) NULL,
	[Costs] [money] NULL,
	[CostsWithVat] [money] NULL,

	
	--Campos de Articulos
	[RangeReviewId] smallint NULL,
	[CategoryId] smallint NULL,
	[ArticleCode] varchar(20) NULL,
	[ArticleName] varchar(200) NULL,
	[EAN] varchar(50) NULL,
	[UOM] varchar(50) NULL,
	[Brand] varchar(255) NULL,
	[Manufacturer] varchar(255) NULL,
	[NotFoundCategory] varchar(100) NULL,
	[Size] [smallmoney] NULL,
	[Width] [smallmoney] NULL,
	[Height] [smallmoney] NULL,
	[Facings] [smallmoney] NULL,
	[Attribute1] [varchar](200) NULL,
	[Attribute2] [varchar](200) NULL,
	[Attribute3] [varchar](200) NULL,
	[Attribute4] [varchar](200) NULL,
	[Attribute5] [varchar](200) NULL,
	[TaxRate] [smallmoney] NULL,

	--Campos de Tiendas
	[CountryId] [smallint] NULL,
	[StoreCode] [varchar](50) NULL,
	[StoreName] [varchar](200) NULL,
	[Region] [varchar] (100) NULL,
	[City] [varchar] (100) NULL,
	[Address] [varchar](400) NULL,
	[Phone] [varchar](50) NULL,
	[Fax] [varchar](50) NULL,
	[Format][varchar](100) NULL
)
